public class Solution {
    public int rectCover(int target) {

        if (target < 3)
            return target;

        int[] ret = new int[target + 1];
        ret[1] = 1;
        ret[2] = 2;
        for (int i = 3; i <= target; i++)
            ret[i] = ret[i - 1] + ret[i - 2];

        return ret[target];
    }
}
